Loading required package: nnet
Attaching package: ‘car’
The following object(s) are masked from ‘package:Hmisc’:
recode
The following object(s) are masked from ‘package:boot’:
logit
scatterplot(nes$christians, nes$cfundamentals) #make a fancy scatterplot with
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
#boxplots on the side and lines
#of best fit!
>
scatterplot(nes$christians, nes$cfundamentals)
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
scatterplot(blacks, whiteppl, 'xlim 10')
boxplot(blacks)
SUMMARY(BLACKS)
Error: could not find function "SUMMARY"
summary(whitppl)
Error in summary(whitppl) : object 'whitppl' not found
summary(whiteppl)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.00 50.00 70.00 73.32 85.00 100.00 270
For this midterm I first had to download the dataset, codebook, and script all to a single folder, labeled “Quantitative Methods”. Then I had to change the directory to this folder and command R to read the data into R, so that it could do all the other commands that were required. I looked at the code book, and decided to focus on blacks and whiteppl. For each variable, I did the commands to generate the summary statistics. Then I did the box plot command to generate a box plot for each variable. This gave me a better understanding of the data. To do the scatterplot I had to download another package which then allowed me to make the command to form a scatter plot of good detail which provided a good visual summary of the two variables.
Box Plots- a graphic representation of a distribution by a rectangle, the endsof which mark the maximum and minimum values, and in which themedian and first and third quartiles are marked by lines parallel to the ends
Scatter Plot-
A scatter plot is a graph made by plotting ordered pairs in a coordinate plane to show the correlation between two sets of data.
A scatter plot describes a positive trend if, as one set of values increases, the other set tends to increase.
A scatter plot describes a negative trend if, as one set of values increases, the other set tends to decrease.
A scatter plot shows no trend if the ordered pairs show no correlation.
nes$V083218b[nes$V083218b=="-1. INAP, 0-12,-8,-9 in Y3"] <- NA
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.00 50.00 70.00 72.04 85.00 100.00 267
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.00 60.00 85.00 78.55 100.00 100.00 253
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
18.00 33.00 47.00 47.37 59.00 93.00 45
[1] 0.5477493
[1] NA
[1] 0.5172538
Error: unexpected symbol in "boxplot(blacks)blue"
[1] NA
Error in library(aplpack) : there is no package called ‘aplpack’
Error in boxplot.default(blacks, whiteppl, xlab = votes) :
object 'votes' not found
Error: unexpected symbol in "violinplot(blacks,whiteppl, xlab="votes, ylab="quantity"
Error in plot(x, y) : object 'x' not found
function (topic, package = NULL, lib.loc = NULL, verbose = getOption("verbose"),
try.all.packages = getOption("help.try.all.packages"), help_type = getOption("help_type"))
The downloaded binary packages are in
C:\Users\JoshC\AppData\Local\Temp\RtmpWQAked\downloaded_packages
Loading required package: MASS
Loading required package: nnet
Attaching package: ‘car’
The following object(s) are masked from ‘package:Hmisc’:
recode
The following object(s) are masked from ‘package:boot’:
logit
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
>
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
Error: could not find function "SUMMARY"
Error in summary(whitppl) : object 'whitppl' not found
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.00 50.00 70.00 73.32 85.00 100.00 270
For this midterm I first had to download the dataset, codebook, and script all to a single folder, labeled “Quantitative Methods”. Then I had to change the directory to this folder and command R to read the data into R, so that it could do all the other commands that were required. I looked at the code book, and decided to focus on blacks and whiteppl. For each variable, I did the commands to generate the summary statistics. Then I did the box plot command to generate a box plot for each variable. This gave me a better understanding of the data. To do the scatterplot I had to download another package which then allowed me to make the command to form a scatter plot of good detail which provided a good visual summary of the two variables.
Box Plots-
a graphic representation of a distribution by a rectangle, the endsof which mark the maximum and minimum values, and in which themedian and first and third quartiles are marked by lines parallel to the ends
Scatter Plot-
A scatter plot is a graph made by plotting ordered pairs in a coordinate plane to show the correlation between two sets of data.